package app.k.com.kframedemo;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;

import com.viewplug.view.custom.CustomGuaView;

/**
 * Created by mac_wk on 14-12-26.
 */
public class GuaGuaLeActicity extends Activity {
    private CustomGuaView customGuaView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.guagua_layout);
        //开启opengl加速
        customGuaView = (CustomGuaView) findViewById(R.id.scroll);
        customGuaView.setText("$5000000");

        findViewById(R.id.restart_btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                customGuaView.setBackgroundColor(getResources().getColor(android.R.color.holo_blue_light));
                customGuaView.setBackgroudResource(R.drawable.ic_launcher);
            }
        });
    }
    @Override
    protected void onDestroy() {
        super.onDestroy();
        //用完记得释放资源
        customGuaView.destory();
    }
}
